package 进阶.递归;

import java.io.File;

public class demo02 {
    public static void main(String[] args) {
        File file = new File("d:/");
        m(file);


    }

    private static void m(File file) {
        File[] files = file.listFiles();
        assert files != null;
        for (File f:files
        ) {
            if(f.isDirectory()){
                m(f);
            }else {
                String name = f.getName();
                if (name.endsWith(".avi")){
                    System.out.println(f);
                }

            }

        }

    }
}
